<template>
    <div>
      <Table border :columns="columns" :data="data"></Table>
    </div>
</template>
<script>
import axios from 'axios';
export default {
    name:'principaltable',
    data(){
        return{
            columns:[
        {
          type: "selection",
          width: 60,
          align: "center",
          fixed: "left"
        },
        {
          title: "序号111",
          key: "id"
        },
        {
          title: "操作",
          fixed: "right",
          key:"number",
          width: 120,
          render:(h,params) => {
            return h(
              "Dropdown",
              {
                on:{
                  "on-click": name =>{
                    let rowData = params.row;
                    let id = rowData.id;
                    if(name=='read'){

                    }else if(name=='edit'){
                      this.orgDtailedit=true;
                    }else if(name=='export'){
                      
                    }
                  }
                },
                props: {
                  transfer: true
                }
              },
              [
                h(
                  "Button",
                  {
                    props: {
                      type: "primary"
                    }
                  },
                  "操作>>"
                ),
                h(
                  "DropdownMenu",
                  {
                    slot: "list"
                  },
                  [
                    h(
                      "DropdownItem",
                      {
                        props: {
                          name: "read"
                        }
                      },
                      "查看详情"
                    ),
                    h(
                      "DropdownItem",
                      {
                        props: {
                          name: "edit"
                        }
                      },
                      "编制项目"
                    ),
                    h(
                      "DropdownItem",
                      {
                        props: {
                          name: "export"
                        }
                      },
                      "导出任务单"
                    ),
                  ]
                )
              ]
            )
          },
        }
      ],
      data:[
        {
          id:1,
          number:1
        }
      ],

        };
    }
}
</script>